/* 交易量监控大屏样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.monitor-body {
    background: linear-gradient(135deg, #0c0c2e 0%, #1a1a3a 100%);
    color: #ffffff;
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 顶部导航栏 */
.monitor-navbar {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    border-bottom: 2px solid #4FC3F7;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.navbar-brand .title-icon {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.time-display {
    font-size: 1.2rem;
    font-weight: 500;
    color: #4FC3F7;
    background: rgba(79, 195, 247, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

/* 主容器 */
.monitor-container {
    padding: 2rem;
    max-width: 100%;
}

/* 监控面板 */
.monitor-panel {
    background: linear-gradient(145deg, #1a1a3a 0%, #2d2d5f 100%);
    border-radius: 1rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.monitor-panel:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 面板头部 */
.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(79, 195, 247, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
}

.panel-title .title-icon {
    margin-right: 0.75rem;
    font-size: 1.4rem;
}

.panel-controls select,
.panel-controls input[type="datetime-local"] {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
}

.panel-controls select:focus,
.panel-controls input[type="datetime-local"]:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 195, 247, 0.25);
    border-color: #4FC3F7;
}

.panel-controls select option {
    background: #2d2d5f;
    color: #ffffff;
}

.panel-controls input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* 交易量统计数据样式 */
.transaction-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
}

.panel-controls {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.control-label {
    font-size: 0.8rem;
    color: #B0BEC5;
    font-weight: 400;
    margin: 0;
}

/* 面板内容 */
.panel-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 图表容器 */
.chart-container {
    width: 100%;
    height: 400px;
    min-height: 350px;
    flex: 1;
}

/* 省份面板和中心面板样式 */
.row .col-12 .monitor-panel {
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

.row .col-12 .panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 统计数据通用样式 */
.transaction-stats,
.center-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background: rgba(79, 195, 247, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(79, 195, 247, 0.2);
    min-width: 80px;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #4FC3F7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-value.success-rate {
    color: #81C784;
}

.stat-value.fail-count {
    color: #F44336;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #B0BEC5;
    margin-top: 0.25rem;
}

/* 图表图例 */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(79, 195, 247, 0.2);
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #B0BEC5;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
}

/* 失败码列表 */
.fail-code-list {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.fail-code-list::-webkit-scrollbar {
    width: 6px;
}

.fail-code-list::-webkit-scrollbar-track {
    background: rgba(79, 195, 247, 0.1);
    border-radius: 3px;
}

.fail-code-list::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.4);
    border-radius: 3px;
}

.table-dark {
    background-color: transparent;
    border-color: rgba(79, 195, 247, 0.2);
}

.table-dark th,
.table-dark td {
    border-color: rgba(79, 195, 247, 0.2);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 0.5rem;
}

.table-dark th {
    background-color: rgba(79, 195, 247, 0.1);
    color: #4FC3F7;
    font-weight: bold;
}

.table-dark tbody tr:hover {
    background-color: rgba(79, 195, 247, 0.1);
}

/* 状态指示器 */
.status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(81, 199, 132, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.status-indicator.error {
    background: rgba(244, 67, 54, 0.9);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 46, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-text {
    margin-top: 1rem;
    color: #4FC3F7;
    font-size: 1.1rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 省份选择器样式 */
.province-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.province-select-btn {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: left;
    width: 100%;
}

.province-select-btn:hover {
    background: rgba(79, 195, 247, 0.2);
    border-color: #4FC3F7;
    color: #ffffff;
}

.selected-provinces {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.province-tag {
    background: rgba(79, 195, 247, 0.8);
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.province-tag .remove-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.province-tag .remove-btn:hover {
    color: #ffcccc;
}

/* 省份模态框样式 */
.province-modal-content {
    background: linear-gradient(145deg, #1a1a3a 0%, #2d2d5f 100%);
    border: 1px solid rgba(79, 195, 247, 0.2);
    color: #ffffff;
}

.province-modal-content .modal-header {
    border-bottom: 1px solid rgba(79, 195, 247, 0.2);
}

.province-modal-content .modal-footer {
    border-top: 1px solid rgba(79, 195, 247, 0.2);
}

.province-modal-content .btn-close {
    color: #ffffff;
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 0.8;
}

.province-modal-content .btn-close:hover {
    opacity: 1;
}

.province-search input {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    color: #ffffff;
    border-radius: 0.5rem;
}

.province-search input:focus {
    background: rgba(79, 195, 247, 0.15);
    border-color: #4FC3F7;
    box-shadow: 0 0 0 0.2rem rgba(79, 195, 247, 0.25);
    color: #ffffff;
}

.province-search input::placeholder {
    color: #B0BEC5;
}

.province-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.province-item {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.province-item:hover {
    background: rgba(79, 195, 247, 0.2);
    border-color: #4FC3F7;
}

.province-item.selected {
    background: rgba(79, 195, 247, 0.6);
    border-color: #4FC3F7;
    color: #ffffff;
    font-weight: bold;
}

.province-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selected-summary {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.selected-summary strong {
    color: #4FC3F7;
}

.province-grid::-webkit-scrollbar {
    width: 6px;
}

.province-grid::-webkit-scrollbar-track {
    background: rgba(79, 195, 247, 0.1);
    border-radius: 3px;
}

.province-grid::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.4);
    border-radius: 3px;
}
@media (max-width: 1200px) {
    .monitor-container {
        padding: 1rem;
    }
    
    .panel-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .center-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    .time-display {
        font-size: 1rem;
    }
    
    .chart-container {
        height: 250px;
        min-height: 200px;
    }
    
    .panel-title {
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .row .col-12 .monitor-panel {
        min-height: 350px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.monitor-panel {
    animation: fadeInUp 0.6s ease-out;
}

.monitor-panel:nth-child(1) { animation-delay: 0.1s; }
.monitor-panel:nth-child(2) { animation-delay: 0.2s; }
.monitor-panel:nth-child(3) { animation-delay: 0.3s; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(79, 195, 247, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 195, 247, 0.6);
}

/* 历史监控统计卡片样式 */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4FC3F7 0%, #29B6F6 50%, #81C784 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(79, 195, 247, 0.2);
    border-color: #4FC3F7;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #4FC3F7;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.3rem;
    background: rgba(0, 0, 0, 0.2);
    display: inline-block;
}